package org.xxpay.service.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.xxpay.core.entity.TbWang;
import org.xxpay.core.entity.TbWangExample;

import java.util.List;

public interface TbWangMapper {
    int countByExample(TbWangExample example);

    int deleteByExample(TbWangExample example);

    int deleteByPrimaryKey(String orderNo);

    int insert(TbWang record);

    int insertSelective(TbWang record);

    List<TbWang> selectByExample(TbWangExample example);

    TbWang selectByPrimaryKey(String orderNo);

    int updateByExampleSelective(@Param("record") TbWang record, @Param("example") TbWangExample example);

    int updateByExample(@Param("record") TbWang record, @Param("example") TbWangExample example);

    int updateByPrimaryKeySelective(TbWang record);

    int updateByPrimaryKey(TbWang record);

    /**
     * 根据设备号修改状态
     *
     * @param tbWang TbWang
     * @return 结果
     */
    int updateByDeviceNo(TbWang tbWang);

    /**
     * 根据金额得到一条红包信息
     *
     * @param tbWang TbWang
     * @return TbWang
     */
    TbWang getTbWangByAmount(TbWang tbWang);

    /**
     * 更新订单状态
     *
     * @param tb TbWang
     * @return 结果
     */
    int updateStatus(TbWang tb);
}